package main

import . "local/algorithm/util"

func revertLinkedList(node *ListNode) *ListNode {
	var prev *ListNode
	current := node
	for current != nil {
		tmp := current.Next
		current.Next = prev
		prev = current
		current = tmp
	}
	return prev
}
